-- the node in list is (record + pointer)
-- so we use table to represent the node structure

local header = {next = nil, value = -1}

local value = 10
local node = {next = nil, value = -1} 	-- initialize
node.value = value
node.next = header.next
header.next = node

local l = header

while l do
	print(l.next, l.value)
	l = l.next
end

